<template>
    <div id="schedule">
      <h3>我的日程</h3>
      <div class="group">
        <ul class="clearfix">
          <li v-for="(item,index) in resData.friend" @click="getItemData(item.list)">{{item.groupname}}</li>
        </ul>
        <div class="groupItem">
          <ul>
            <li v-for="item in itemData">
              <p>{{item.username}}</p>
              <p>{{item.sign}}</p>
            </li>
          </ul>
        </div>
      </div>
    </div>
</template>

<script>
  import Axios from 'axios';
    export default {
        name: "schedule",
      data(){
          return{
            resData:'',
            itemData:[],
          }
      },
      methods:{
        getItemData(itemData){
          this.itemData=itemData;
        },
      },
      mounted(){
        Axios.get('http://www.gqluck.com/index/index/getList').then(
          response=> {
            console.log(response);
            this.resData=response.data.data;
          }
        )
      },
    }
</script>

<style scoped>
  .group>ul{
    padding: 20px;
    box-sizing: border-box;
    background-color: lavenderblush;
  }
  .group>ul>li{
    list-style: none;
    float: left;
    width: 33.33%;
    height: 100%;
  }
  .groupItem ul>li{
    text-align: left;
    list-style: disc !important;
  }
</style>
